import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'ac_guide_logic.dart';

class AcGuidePage extends StatelessWidget {
  final logic = Get.find<AcGuideLogic>();
  final state = Get.find<AcGuideLogic>().state;

  @override
  Widget build(BuildContext context) {
    precacheImage(const AssetImage("images/login_bg.png"), context);
    precacheImage(const AssetImage("images/guide2.png"), context);
    precacheImage(const AssetImage("images/guide3.png"), context);
    return GestureDetector(
      onTap: logic.nextPage,
      child: PageView(
        controller: state.pageController,
        onPageChanged: logic.onPageChanged,
        children: [
          Image.asset(
            "images/guide1.png",
            width: 375.w,
            height: 812.h,
          ),
          Image.asset(
            "images/guide2.png",
            width: 375.w,
            height: 812.h,
          ),
          Image.asset(
            "images/guide3.png",
            width: 375.w,
            height: 812.h,
          ),
        ],
      ),
    );
  }
}
